import { copy, defHideLoading, defShowLoading, notifyError, notifyInfo, notifySuccess, notifyWarning, showToast } from '@/common'
import 'uno.css'

// "async" is optional;
// more info on params: https://quasar.dev/quasar-cli/boot-files
export default async ({ app }) => {
  await initProps(app.config.globalProperties)
}

async function initProps(globalProps) {
  globalProps.$notify = showToast
  globalProps.$notifySuccess = notifySuccess
  globalProps.$notifyInfo = notifyInfo
  globalProps.$notifyWarning = notifyWarning
  globalProps.$notifyError = notifyError

  globalProps.$loading = defShowLoading
  globalProps.$hideLoading = defHideLoading

  globalProps.$copy = copy
}
